/**
 * <p>
 * 表格配置
 *
 * @Author：Roy
 * @Description：碳排放未规划配置
 * @Date：Create by 2024-01-19 14:15:35
 */
// 隐藏操作按钮的规则配置，字段名：isEdit
const isHidden = (list, row) => {
  const { isEdit } = row || {}
  return list.includes(String(isEdit))
}

const headerConfig = {
  'carbon-emission-unplan': [
    {
      prop: 'unplanDate',
      name: '未规划日期',
      minWidth: 110
    },
    {
      prop: 'sceneProjectId',
      name: '项目Id',
      minWidth: 110
    },
    {
      prop: 'sceneEdificeId',
      name: '楼栋Id',
      minWidth: 110
    },
    {
      name: '操作',
      width: 200,
      fixed: 'right',
      thStyle: { 'text-align': 'left' },
      operateList: [
        {
          type: 'btnText',
          label: '编辑',
          id: 'carbon-emission-unplan-edit',
          authId: 'ecp-admin:carbonEmissionUnplan:update',
          config: { type: 'text' },
          style: { color: 'rgb(219,139,57)' },
          hidden: (val) => {
            return false // !isHidden(['1'], val)
          }
        },
        {
          type: 'btnText',
          label: '删除',
          id: 'carbon-emission-unplan-delete',
          authId: 'ecp-admin:carbonEmissionUnplan:deleteById',
          isMore: true,
          config: { type: 'text' },
          style: { color: '#ff0000' },
          hidden: (val) => {
            return false // !isHidden(['1'], val)
          }
        }
      ]
    }
  ]
}

export default {}
export { headerConfig }
